﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Entity;

public partial class Admin_Pages_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["login"] != null)
            {
                OrderBillUI orderUI = new OrderBillUI();
                DataSet dsOrder= orderUI.Statistic();
                lblAll.Text = dsOrder.Tables[0].Rows[0]["All"].ToString();
                lblOWait.Text=dsOrder.Tables[0].Rows[0]["Wait"].ToString();
                lblOPaid.Text = dsOrder.Tables[0].Rows[0]["Paid"].ToString();
                lblOComp.Text = dsOrder.Tables[0].Rows[0]["Complete"].ToString();
                lblReject.Text = dsOrder.Tables[0].Rows[0]["Reject"].ToString();

                FeedBackUI feedUI = new FeedBackUI();
                DataSet dsFeedBack = feedUI.Statistic();
                lblFeedBackAll.Text = dsFeedBack.Tables[0].Rows[0]["All"].ToString();
                lblRead.Text = dsFeedBack.Tables[0].Rows[0]["Read"].ToString();
                lblUnRead.Text = dsFeedBack.Tables[0].Rows[0]["Unread"].ToString();

                CustomerUI cusUI = new CustomerUI();
                DataSet dsCus = cusUI.Statistic();
                lblCusAll.Text = dsCus.Tables[0].Rows[0]["All"].ToString();
                lblUnlock.Text = dsCus.Tables[0].Rows[0]["UnLock"].ToString();
                lblLock.Text = dsCus.Tables[0].Rows[0]["Lock"].ToString();

                ImagesUI imgUI = new ImagesUI();
                DataSet dsImg = imgUI.Statistic();
                lblImageAll.Text = dsImg.Tables[0].Rows[0]["All"].ToString();
                lblShow.Text = dsImg.Tables[0].Rows[0]["Show"].ToString();
                lblHide.Text = dsImg.Tables[0].Rows[0]["Hide"].ToString(); 
            }
            else
            {
                Response.Redirect("../Login.aspx");
            }
        }
    }
}
